//
//  WProfbViewController.swift
//  iiatn
//
//  Created by mnine on 18/3/31.
//  Copyright © 2018年 mnine. All rights reserved.
//

import UIKit
import SVProgressHUD

class WProfbViewController: WCProViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 获取首页数据
        weak var weakSelf = self
        WNetwork.shareNetworkTool.hadfabuPro(uid: wuserid!){ (mpros) in
            weakSelf!.items = mpros
            weakSelf!.tableView!.reloadData()
        }
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.0) {
            SVProgressHUD.dismiss()
        }
    }
    
    override func loadData() {
        // 获取首页数据
        weak var weakSelf = self
        WNetwork.shareNetworkTool.hadfabuPro(uid: wuserid!) { (mpros) in
            weakSelf!.items = mpros
            weakSelf!.tableView!.reloadData()
            weakSelf!.refreshControl?.endRefreshing()
        }
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.0) {
            SVProgressHUD.dismiss()
        }
    }
    
}
